package com.kuang.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class RestSpringMvc {

    @RequestMapping("/demo1")
    public String demo1(){
        //转发  这种要把视图解析器关掉
        return "/index.jsp";
    }
    @RequestMapping("/demo2")
    public String demo2(){
        //转发二
        return "forward:/index.jsp";
    }
    @RequestMapping("/demo3")
    public String demo3(){
        //重定向
        return "redirect:/form.jsp";
    }
}
